import request from '@/request/api'
// 1、获取树的根节点信息
export function getTreeRootData(data) {
  return request({
    url: '/eam-service-monitor/equipment/getTreeNode',
    method: 'get',
    params: data
  })
}
// 1、获取树的根节点信息
export function getYCTreeRootData(data) {
  return request({
    url: '/eam-service-device/ycMonitorController/codeList',
    method: 'get',
    params: data
  })
}
// 2、页面保存按钮接口
export function saveData(data) {
  return request({
    url: '/eam-service-monitor/equipment/saveOrUpdate',
    method: "post",
    data: data
  })
}
// 2、页面保存按钮接口
export function saveYCData(data) {
  return request({
    url: "/eam-service-device/ycMonitorController/ConnectionEquipment2",
    method: "post",
    data: data,
  });
}
export function nodeCodeSelect(data) {
  return request({
    url: '/eam-service-monitor/water/getItems',
    method: 'get',
    params: data
  })
}
// 根据监测对象的code查询是否关联台账设备
export function getByCode(data) {
  return request({
    url: "/eam-service-device/ycMonitorController/getByCode",
    method: "get",
    params: data,
  });
}
// 4、查询列表-判断当前是水司还是供水
export function getCurrentOrg(data) {
  return request({
    url: '/eam-service-monitor/equipment/queryList',
    method: 'get',
    params: data
  })
}
// 5、删除页面数据接口
export function deleteCurrentData(data) {
  return request({
    url: '/eam-service-monitor/equipment/deleteById',
    method: 'get',
    params: data
  })
}
// 6、数据源下拉框接口
export function dataSourceData(data) {
  return request({
    url: '/eam-service-monitor/common/getDataSource',
    method: 'get',
    params: data
  })
}
//7、同步按钮接口
export function syncNodeData(data) {
  return request({
    url: '/eam-service-monitor/yhsw/syncNode',
    method: 'get',
    params: data
  })
}